<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="../../libs/mui.min.css"/>
    <link rel="stylesheet" href="../../css/main.css"/>
    <link rel="stylesheet" href="../../css/card-online.css"/>
</head>

<body>
<div class="head">
    <img id="back" src="../../images/all-left.png" alt="">
    <p>线上申请信用卡</p>
</div>
<ul class="content">
    <!--<li class="item-card">
        <p>申请银行：<span>中国银行</span></p>
        <p>申请时间：<span></span></p>
        <p class="img-box">
            <img src="../../images/right-back.png" />
        </p>
    </li>-->
</ul>
<script src="../../js/jquery-3.1.1.min.js"></script>
<script src="../../libs/mui.min.js"></script>
<script src="../../js/url.js"></script>
<script>
    $('#back').on('tap', function () {
        mui.back();
    });
    $.ajax({
        type: "get",
        url: ur + "rest/loanController/online-credit-card",
        async: true,
        dataType: 'json',
        success: function (data) {
            if (data.meta.code == 'S002') {
                for (var i = 0; i < data.data.length; i++) {
                    var cardItem = '<li class="item-card" herf="' + data.data[i].link + '">' +
                        '<p class="bank">申请银行：<span>' + data.data[i].bank + '</span></p>' +
                        '<p class="time">申请时间：<span>' +
                        new Date(data.data[i].createDate).toLocaleString() + '</span></p>' +
                        // '<p class="img-box"><img src="../../images/right-back.png" /></p>' +
                        '</li>';
                    $('ul.content').append(cardItem);
                }
                $('ul.content').on('tap', 'li', function () {
                    localStorage.swiper_id = $(this).attr('herf');
                    href('swiper-news.html', '');
                });
            }
        }
    });
</script>
</body>
</html>